#pragma unmanaged

#include <BWAPI.h>

#pragma managed

#include "AIManaged.h"
#include "AIModule.h"

using namespace BroodWar;

void AIModule::onStart()
{
	AIManaged::Start();
}

void AIModule::onEnd(bool isWinner)
{
	AIManaged::End(isWinner);
}

void AIModule::onFrame()
{
	AIManaged::Frame();
}

void AIModule::onSendText(std::string text)
{
	AIManaged::SendText(gcnew System::String(text.c_str()));
}

void AIModule::onReceiveText(BWAPI::Player* player, std::string text)
{
	AIManaged::ReceiveText(player, gcnew System::String(text.c_str()));
}

void AIModule::onPlayerLeft(BWAPI::Player* player)
{
	AIManaged::PlayerLeft(player);
}

void AIModule::onNukeDetect(BWAPI::Position target)
{
	AIManaged::NukeDetect(target);
}

void AIModule::onUnitDiscover(BWAPI::Unit* unit)
{
	AIManaged::UnitDiscover(unit);
}

void AIModule::onUnitEvade(BWAPI::Unit* unit)
{
	AIManaged::UnitEvade(unit);
}

void AIModule::onUnitShow(BWAPI::Unit* unit)
{
	AIManaged::UnitShow(unit);
}

void AIModule::onUnitHide(BWAPI::Unit* unit)
{
	AIManaged::UnitHide(unit);
}

void AIModule::onUnitCreate(BWAPI::Unit* unit)
{
	AIManaged::UnitCreate(unit);
}

void AIModule::onUnitDestroy(BWAPI::Unit* unit)
{
	AIManaged::UnitDestroy(unit);
}

void AIModule::onUnitMorph(BWAPI::Unit* unit)
{
	AIManaged::UnitMorph(unit);
}

void AIModule::onUnitRenegade(BWAPI::Unit* unit)
{
	AIManaged::UnitRenegade(unit);
}

void AIModule::onSaveGame(std::string gameName)
{
	AIManaged::SaveGame(gcnew System::String(gameName.c_str()));
}

void AIModule::onUnitComplete(BWAPI::Unit *unit)
{
	AIManaged::UnitComplete(unit);
}
